package com.zp.self.module.level_5_设计模式.行为型模式.Ⅳ_责任链模式;

/**
 * @author ：by Zeng Peng
 * @date ：Created 2022/7/2 22:47
 * @description ：
 */
public class Client {
    public static void main(String[] args) {

        GroupLeader groupLeader = new GroupLeader();
        Manager manager = new Manager();
        GeneralManager generalManager = new GeneralManager();
        OverHandler overHandler = new OverHandler();
        groupLeader.setNextHandler(manager);
        manager.setNextHandler(generalManager);
        generalManager.setNextHandler(overHandler);

        LeaveRequest leaveRequest = new LeaveRequest("法外狂徒[张三]",1,"请假：去求偶");
        groupLeader.submit(leaveRequest);

        System.out.println("----------- 华丽的分割线 -----------");

        LeaveRequest leaveRequest2 = new LeaveRequest("法外狂徒[张三]",3,"请假：去求偶");
        groupLeader.submit(leaveRequest2);

        System.out.println("----------- 华丽的分割线 -----------");

        LeaveRequest leaveRequest3 = new LeaveRequest("法外狂徒[张三]",365,"请假：去求偶");
        groupLeader.submit(leaveRequest3);
    }
}
